<template>
	<div>
		<div class="header" v-if="isShowHeader">
			<div class="title">{{newsTypeName}}</div>
			<div><a href="#">更多></a></div>
		</div>
		<ul class="dynews">
			<li v-for="item in datalist" :index="item.id">
				<span><a href="" class="">{{item.title}}</a></span>
				<span >{{item.rtext}}</span>
			</li>
			
		</ul>
	</div>
</template>

<script>
	export default{
		name:'newList',
		props:{
			datalist: Array,
			isShowHeader: true,
			newsTypeName:String
		
		}
	}
</script>

<style scoped="scoped" lang="less">
	.header{
				height: 40px;
				line-height: 40px;
				display: flex;
				justify-content:space-between;
				background: #efefef;
				padding: 0 10px;
				.title{
					color: #037EDB;
				}
			}
			.dynews {
				margin-top: 10px;
				
			
				 li {
					line-height: 35px;
					background-repeat: no-repeat;
					background-position: 0 center;
					padding-left: 10px;
					text-align: left;
					span:first-child {
						display: left;
						line-height: 30px;
						
					  
						
					}
					span:last-child {
						float: right;
						color:#ccc;
					}
				}
			}
			.dynews:after {
				content: '';
				display: block;
				clear: both;
			}
</style>
